// 业务模块的api
import axios from '@/utils/request'

// 分页查询条款库信息
export function getLoadCaseStatisticList(data) {
  return axios({
    method: 'get',
    url: '/editor/loadCaseStatistics/page',
    params: data
  })
}
// 新增条款库
export function addLoadCaseStatistic(data) {
    return axios({
        method: 'post',
        url: '/editor/loadCaseStatistics',
        data
    })
}
// 修改条款库
export function editLoadCaseStatistic(data) {
    return axios({
        method: 'put',
        url: '/editor/loadCaseStatistics',
        data
    })
}
// 删除条款库
export function deleteLoadCaseStatistic(ids) {
    return axios({
        method: 'delete',
        url: `/editor/loadCaseStatistics/${ids}`
    })
}
//新增树节点
export function addTreeNode(data) {
    return axios({
      method: 'post',
      url: '/editor/loadCaseStatisticTree',
      data:data
    })
  }
  //修改树节点
  export function updateTreeNode(data) {
    return axios({
      method: 'put',
      url: '/editor/loadCaseStatisticTree',
      data:data
    })
  }
  //删除树节点
  export function deleteTreeNode(id) {
    return axios({
      method: 'delete',
      url: `/editor/loadCaseStatisticTree/${id}`,
    })
  }
  //获取整体树结构
  export function getAllTreeNode() {
    return axios({
      method: 'get',
      url: '/editor/loadCaseStatisticTree/tree',
    })
  }